KeyPress

Presses and releases one or more keyboard keys on a window or control, or at the application level.

Syntax

KeyPress("KeyName")

Arguments

Argument Description
KeyName Key to release. Valid key codes are available on Microsoft's web site.

To release keys in combination with modifiers, such as Ctrl, Shift, and Alt, enter the primary key followed by the modifier key. For example, D1, Shift releases the Shift and 1 keys. D1 is the primary key and Shift is the modifier key.

Tip: To determine the correct key code and modifier order, enter the key combination for this statement in the Add Statement dialog box.

Supported objects

Browser, Button, Calendar, Cell, CheckBox, ColumnHeader, ComboBox, ContextMenu, Control, DateTimePicker, EditBox, Grid, HTMLElement, HTMLLink, HTMLTable, Image, Item, Label, Link, ListBox, ListView, Menu, NavigationField, PopupMenu, ProgressBar, RadioButton, Row, RowHeader, ScrollBar, Slider, SpinBox, SubItem, Tab, TabBar, ToolBar, Tree, Window

Example

Window("Report a Bug").EditBox("editboxUsername").KeyPress("C, Control")

KeyPress("Menu, Alt")

low-level action